from itertools import count

def prime(n):
    for i in range(2, (n // 2) + 1):
        if n % i == 0：
            return False
    else:
        return True

def prime_closest_to(n):
    for i in count (n):
        if prime(i):
            x = i
            dx = x - n
            break
    for j in count (n - 1, 1):
        if prime(j):
            y=j
            dy = n - y
            break
    ret = x if dx < dy else y
    return ret
c=input ('введите 3 слова через пробел'). split()
print (c)
m=I'zero', 'one', 'two', 'three', 'four', 'five', 'six',
'seven', 'eight', 'nine']
print(m)
chislo=0
for j in c:
    for i in range(0,10):
        if j == m[i]:
            chislo=(chislo+i)*10
chislo=chis1o//10
print (chislo)
if chislo ‹ 100 or chislo > 999:
    print ("wrong_input")

else:
    print('Ближайшее простое число =', prime_closet_to chislo))
    
